using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._GeoAnalyticsServerTools._ManageData
{
    /// <summary>
    /// <para>Dissolve Boundaries</para>
    /// <para>Finds polygons that intersect or have the same field values and merges them to form a single polygon.</para>
    /// <para>查找相交或具有相同字段值的多边形，并将它们合并以形成单个多边形。</para>
    /// </summary>    
    [DisplayName("Dissolve Boundaries")]
    public class DissolveBoundaries : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public DissolveBoundaries()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_input_layer">
        /// <para>Input Features</para>
        /// <para>The layer containing the polygon features that will be dissolved.</para>
        /// <para>包含将要融合的面要素的图层。</para>
        /// </param>
        /// <param name="_output_name">
        /// <para>Output Name</para>
        /// <para>The name of the output feature service.</para>
        /// <para>输出要素服务的名称。</para>
        /// </param>
        public DissolveBoundaries(object _input_layer, object _output_name)
        {
            this._input_layer = _input_layer;
            this._output_name = _output_name;
        }
        public override string ToolboxName => "GeoAnalytics Server Tools";

        public override string ToolName => "Dissolve Boundaries";

        public override string CallName => "geoanalytics.DissolveBoundaries";

        public override List<string> AcceptEnvironments => ["extent", "outputCoordinateSystem", "workspace"];

        public override object[] ParameterInfo => [_input_layer, _output_name, _multipart.GetGPValue(), _dissolve_fields.GetGPValue(), _fields, _summary_fields, _output, _data_store.GetGPValue()];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The layer containing the polygon features that will be dissolved.</para>
        /// <para>包含将要融合的面要素的图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _input_layer { get; set; }


        /// <summary>
        /// <para>Output Name</para>
        /// <para>The name of the output feature service.</para>
        /// <para>输出要素服务的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _output_name { get; set; }


        /// <summary>
        /// <para>Create Multipart Features</para>
        /// <para><xdoc>
        ///   <para>Specifies whether multipart features will be created in the output feature class.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Multipart features will be created.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Multipart features will not be created. Individual features will be created for each part instead. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否在输出要素类中创建多部分要素。</para>
        ///   <bulletList>
        ///     <bullet_item>选中—将创建多部分要素。</bullet_item><para/>
        ///     <bullet_item>未选中 - 将不创建多部分要素。将为每个零件创建单独的特征。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Create Multipart Features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _multipart_value _multipart { get; set; } = _multipart_value._false;

        public enum _multipart_value
        {
            /// <summary>
            /// <para>MULTI_PART</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("MULTI_PART")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>SINGLE_PART</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("SINGLE_PART")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Dissolve by Field Value(s)</para>
        /// <para><xdoc>
        ///   <para>Specifies whether features with the same field values will be dissolved.</para>
        ///   <para>
        ///     <bulletList>
        ///       <bullet_item>Unchecked—Polygons that share a common border (that is, they are adjacent) or polygons that overlap will be dissolved into one polygon. This is the default.</bullet_item><para/>
        ///       <bullet_item>Checked—Polygons that have the same field value or values will be dissolved.</bullet_item><para/>
        ///     </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否将溶解具有相同字段值的要素。</para>
        ///   <para>
        ///     <bulletList>
        ///       <bullet_item>未选中 - 共享公共边界（即相邻）的面或重叠的面将融合为一个面。这是默认设置。</bullet_item><para/>
        ///       <bullet_item>选中 - 将溶解具有相同字段值的面。</bullet_item><para/>
        ///     </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Dissolve by Field Value(s)")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _dissolve_fields_value? _dissolve_fields { get; set; } = null;

        public enum _dissolve_fields_value
        {
            /// <summary>
            /// <para>DISSOLVE_FIELDS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DISSOLVE_FIELDS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_DISSOLVE_FIELDS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_DISSOLVE_FIELDS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Dissolve Field(s)</para>
        /// <para>The field or fields that will be used to dissolve like features. Features with the same value for each field will be dissolved.</para>
        /// <para>将用于融合类似要素的一个或多个字段。将溶解每个字段具有相同值的要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Dissolve Field(s)")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _fields { get; set; } = null;


        /// <summary>
        /// <para>Summary Fields</para>
        /// <para><xdoc>
        ///   <para>The statistics that will be calculated on specified fields.</para>
        ///   <para>
        ///     <bulletList>
        ///       <bullet_item>Count—The number of nonnull values. It can be used on numeric fields or strings. The count of [null, 0, 2] is 2.</bullet_item><para/>
        ///       <bullet_item>Sum—The sum of numeric values in a field. The sum of [null, null, 3] is 3.</bullet_item><para/>
        ///       <bullet_item>Mean—The mean of numeric values. The mean of [0, 2, null] is 1.</bullet_item><para/>
        ///       <bullet_item>Min—The minimum value of a numeric field. The minimum of [0, 2, null] is 0.</bullet_item><para/>
        ///       <bullet_item>Max—The maximum value of a numeric field. The maximum value of [0, 2, null] is 2.</bullet_item><para/>
        ///       <bullet_item>Standard Deviation—The standard deviation of a numeric field. The standard deviation of [1] is null. The standard deviation of [null, 1,1,1] is null.</bullet_item><para/>
        ///       <bullet_item>Variance—The variance of a numeric field in a track. The variance of [1] is null. The variance of [null, 1, 1, 1] is null.</bullet_item><para/>
        ///       <bullet_item>Range—The range of a numeric field. This is calculated as the minimum value subtracted from the maximum value. The range of [0, null, 1] is 1. The range of [null, 4] is 0.</bullet_item><para/>
        ///       <bullet_item>Any—A sample string from a field of type string.</bullet_item><para/>
        ///     </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将对指定字段进行计算的统计信息。</para>
        ///   <para>
        ///     <bulletList>
        ///       <bullet_item>计数 - 非空值的数目。它可以用于数值字段或字符串。[null， 0， 2] 的计数为 2。</bullet_item><para/>
        ///       <bullet_item>总和 - 字段中数值的总和。[null， null， 3] 的总和为 3。</bullet_item><para/>
        ///       <bullet_item>均值 - 数值的平均值。[0， 2， null] 的平均值为 1。</bullet_item><para/>
        ///       <bullet_item>最小值 - 数值字段的最小值。[0， 2， null] 的最小值为 0。</bullet_item><para/>
        ///       <bullet_item>最大值 - 数值字段的最大值。[0， 2， null] 的最大值为 2。</bullet_item><para/>
        ///       <bullet_item>标准差 - 数值字段的标准差。[1] 的标准差为空。[null， 1,1,1] 的标准差为 null。</bullet_item><para/>
        ///       <bullet_item>方差 - 轨迹中数值字段的方差。[1] 的方差为 null。[null， 1， 1， 1] 的方差为 null。</bullet_item><para/>
        ///       <bullet_item>范围 - 数值字段的范围。这是通过从最大值中减去最小值来计算的。[0， null， 1] 的范围为 1。[null， 4] 的范围为 0。</bullet_item><para/>
        ///       <bullet_item>任意 - 字符串类型字段中的示例字符串。</bullet_item><para/>
        ///     </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Summary Fields")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _summary_fields { get; set; } = null;


        /// <summary>
        /// <para>Output</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output { get; set; }


        /// <summary>
        /// <para>Data Store</para>
        /// <para><xdoc>
        ///   <para>Specifies the ArcGIS Data Store where the output will be saved. The default is Spatiotemporal big data store. All results stored in a spatiotemporal big data store will be stored in WGS84. Results stored in a relational data store will maintain their coordinate system.</para>
        ///   <bulletList>
        ///     <bullet_item>Spatiotemporal big data store—Output will be stored in a spatiotemporal big data store. This is the default.</bullet_item><para/>
        ///     <bullet_item>Relational data store—Output will be stored in a relational data store.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将保存输出的 ArcGIS Data Store。默认值为 Spatiotemporal 大数据存储。存储在时空大数据存储中的所有结果都将存储在 WGS84 中。存储在关系数据存储中的结果将保留其坐标系。</para>
        ///   <bulletList>
        ///     <bullet_item>时空大数据存储 - 输出将存储在时空大数据存储中。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>关系数据存储 - 输出将存储在关系数据存储中。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Data Store")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _data_store_value _data_store { get; set; } = _data_store_value._SPATIOTEMPORAL_DATA_STORE;

        public enum _data_store_value
        {
            /// <summary>
            /// <para>Relational data store</para>
            /// <para>Relational data store—Output will be stored in a relational data store.</para>
            /// <para>关系数据存储 - 输出将存储在关系数据存储中。</para>
            /// </summary>
            [Description("Relational data store")]
            [GPEnumValue("RELATIONAL_DATA_STORE")]
            _RELATIONAL_DATA_STORE,

            /// <summary>
            /// <para>Spatiotemporal big data store</para>
            /// <para>Spatiotemporal big data store—Output will be stored in a spatiotemporal big data store. This is the default.</para>
            /// <para>时空大数据存储 - 输出将存储在时空大数据存储中。这是默认设置。</para>
            /// </summary>
            [Description("Spatiotemporal big data store")]
            [GPEnumValue("SPATIOTEMPORAL_DATA_STORE")]
            _SPATIOTEMPORAL_DATA_STORE,

        }

        public DissolveBoundaries SetEnv(object extent = null, object outputCoordinateSystem = null, object workspace = null)
        {
            base.SetEnv(extent: extent, outputCoordinateSystem: outputCoordinateSystem, workspace: workspace);
            return this;
        }

    }

}